package 蓝桥.十三届;

import java.util.*;

/**
 * @author ZhuYi
 * @create 2025/4/9 15:09
 */
public class C字符统计 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int[] arr = new int[str.length()];
        int i = 0;
        for (char c : str.toCharArray()) {
            int num = c - 'A';
            arr[i++] = num;
        }
        Arrays.sort(arr);
        Map<Integer, Integer> map = new HashMap<>();
        for (int j = 0; j < arr.length; j++) {
            map.put(arr[j], map.getOrDefault(arr[j], 0) + 1);
        }
        int max = 0;
        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            if (entry.getValue() > max) {
                max = entry.getValue();
            }
        }
        for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
            if (entry.getValue() == max) {
                System.out.print((char) (entry.getKey() + 'A'));
            }
        }
    }
}
